/***********************************************************************//**
 *   \file Transfert.h		\author belot nicolas (karrakis)            *
 *   \brief define Class Transfert
 *   handle computation on transfert function                              *
 ************************************************************************//*
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/

#ifndef TRANSFERT_H
#define TRANSFERT_H 1

#include "libtrckr.h"
#include "DynArray"

using namespace std;
namespace libtrckr {
class Transfert {
	/** \class libtrckr::Transfert
	\brief handle computation on transfert function
	*/
	public :
		/** Default Constructor*/
		Transfert( );
		/** Constructor
		\param A contains the a's coefficient
		\param B contains the b's coefficient
		*/
		Transfert(DynArray<double>,DynArray<double>);
		//Transfert(double*,int, double*,int);
		/**Copy constructor*/
		Transfert( const Transfert&);

		~Transfert();
	//Accessor
		/** return the A's coefficient*/
		DynArray<double> getAs() const;//return all A coefficient
		/** return the B's coefficient*/
		DynArray<double> getBs() const;// return all B coefficient
		
		/*vector<double>::iterator getAbegin() const;
		vector<double>::iterator getAend() const;
		
		vector<double>::iterator getBbegin() const;
		vector<double>::iterator getBend() const;*/
		/** set the a's coefficient*/
		void setAs(DynArray<double>);
		/** set the b's coefficient*/
		void setBs(DynArray<double>);

	//Operator
		/** Multiplication*/
		Transfert operator * (const Transfert& ) const;
		/** Multiplication and assign*/
		void operator *= ( Transfert&);
		/** addition*/
		Transfert operator + (const Transfert&) const;
		/** addition and assign*/
		void operator += (const Transfert&);

	//aliases
		/** an another name for multiplication*/
		static Transfert cascade(const Transfert&,const Transfert&);
		/** an another name for addition*/
		static Transfert parallel(const Transfert&,const Transfert&);
	
	private :
		double* a;
		unsigned int na;
		double* b;
		unsigned int nb;
};
}
#endif

